package dbspo

import (
	"time"
)

// 上行数据表
type DeviceUpData struct {
	ID        uint64    `json:"id" gorm:"primaryKey"`
	DeviceId  string    `json:"deviceId" gorm:"size:50"`
	Duplicate bool      `json:"duplicate"`
	Qos       byte      `json:"qos"`
	Retained  bool      `json:"retained"`
	Topic     string    `json:"topic" gorm:"size:500"`
	MessageID uint16    `json:"messageId"`
	Payload   JsonField `json:"payload" gorm:"type:json"`
	CreatedAt time.Time `json:"createdAt" gorm:"created_at"`
}

func (d *DeviceUpData) TableName() string {
	return "ht_message_post"
}
